//
// Created by Administrator on 2018-04-03.
//

#ifndef SELFSTRING_JSTRING_H
#define SELFSTRING_JSTRING_H


#include "iostream"
using namespace std;

class MyString {
private:
    int s_len;
    char *s_p;
public:
    MyString();
    MyString(char *p);
    MyString(const MyString &string);

    virtual ~MyString();

public:
    MyString& operator=(const char* cp);
    MyString& operator=(const MyString& sp);
    bool operator==(const char* cp);
    bool operator==(const MyString& sp);
    bool operator!=(const char* cp);
    bool operator!=(const MyString& sp);
    friend ostream& operator<<(ostream& out , const MyString& sp );
    friend istream& operator>>(istream& in , const MyString& sp );
};


#endif //SELFSTRING_JSTRING_H
